class RolePolicy < ApplicationPolicy
  attr_reader :user, :role

  def index?
    return true if user.role.privilege < 50
  end

  def create?
    return true if user.role.privilege == 0 
  end

  def batch_create?
    return true if user.role.privilege == 0
  end

  class Scope < Scope
    def resolve
      scope.all
    end
  end
end

